package com.example.test.domain.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class ArticleCategory implements Serializable {
    private int id;
    private int parent_id;
    private String class_name;
    private int add_time;
    private List<ArticleCategory> subCategory = new ArrayList<>();

    public int getAdd_time() {
        return add_time;
    }

    public String getClass_name() {
        return class_name;
    }

    public int getParent_id() {
        return parent_id;
    }

    public int getId() {
        return id;
    }

    public List<ArticleCategory> getSubCategory() {
        return subCategory;
    }

    public void setAdd_time(int add_time) {
        this.add_time = add_time;
    }

    public void setClass_name(String class_name) {
        this.class_name = class_name;
    }

    public void setParent_id(int parent_id) {
        this.parent_id = parent_id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setSubCategory(List<ArticleCategory> subCategory) {
        this.subCategory = subCategory;
    }

    public boolean isParentCategory(){
        return this.parent_id==0;
    }
}
